<?php $side_bar	=	 $this->requestAction(array('controller' => 'properties', 'action' => 'side_bar')); ?>
                    <?php /*?><div class="widget sidebar-widget featured-properties-widget">
                        <h3 class="widgettitle"><?php echo __('Featured Properties'); ?></h3>
                        <ul class="owl-carousel owl-alt-controls1 single-carousel" data-columns="1" data-autoplay="no" data-pagination="no" data-arrows="yes" data-single-item="yes">
                        <?php  foreach($side_bar['Property'] as $property): ?>
						<?php 
						if($property['Property']['image1'])
						$image1	=	'/files/property/thumb/'.$property['Property']['image1'];
						else
						$image1	=	'http://placehold.it/600x400&text=IMAGE+COMMING+SOON';
						 ?>
                        
                          <li class="item property-block"> <a href="<?php echo $this->Html->url(array('controller'=>'Properties','action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?>" class="property-featured-image"> <?php echo $this->Html->image($image1,array()); ?> <span class="images-count"><i class="fa fa-picture-o"></i> 2</span> <span class="badges"><?php if(isset($property['Property']['contract_type'])) echo __(ucwords($property['Property']['contract_type'])); ?></span> </a>
                            <div class="property-info">
                              <h4><?php echo $this->Html->link(__(substr($property['Property']['title'],0,20)),array('controller'=>'Properties','action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?></h4>
                              <span class="location"><?php if(isset($property['City']['abbrev'])) echo h($property['City']['abbrev']); ?></span>
                              <div class="price"><strong><?php if(isset($websiteSettings['currency_symbol'])) echo __($websiteSettings['currency_symbol']); ?></strong><span><?php echo number_format($property['Property']['price']); ?></span></div>
                            </div>
                          </li>
				<?php endforeach; ?>
                        </ul>
                    </div><?php */?>
                      <!-- Agents Widget -->
                      <div class="widget sidebar-widget widget-agents">
                      <h3 class="widgettitle"><?php echo __('More Agents'); ?></h3>
                          <ul>
                        <?php foreach($side_bar['User'] as $user): ?>
                              <li>
                                  <div class="row">
						<?php 
						if($user['User']['image'])
						$image 	=	'/files/user/thumb/'.$user['User']['image'];
						else
						$image 	=	'http://placehold.it/500x400&text=IMAGE+COMMING+SOON';
						 ?>
                                      <div class="col-md-5 col-sm-5 col-xs-5">
                                          <a href="<?php echo $this->Html->url(array('controller'=>'users','action'=>'agent_detail',$user['User']['id'],Inflector::slug(strtolower($user['User']['first_name'].' '.$user['User']['last_name']),'-'))) ?>"><?php echo $this->Html->image($image,array('class'=>'img-thumbnail')); ?></a>

                                  </div>
                                  <div class="col-md-7 col-sm-7 col-xs-7">
                                      <strong><?php echo $this->Html->link(strtolower($user['User']['first_name'].' '.$user['User']['last_name']),array('controller'=>'users','action'=>'agent_detail',$user['User']['id'],Inflector::slug(strtolower($user['User']['first_name'].' '.$user['User']['last_name']),'-'))) ?></strong>
                                      <?php 
									  if($user['User']['work_phone'])
                                      echo '<span class="badge"><i class="fa fa-phone"></i>'.h($user['User']['work_phone']).'</span>';
									  else if($user['User']['mobile_phone'])
                                      echo '<span class="badge"><i class="fa fa-phone"></i>'.h($user['User']['mobile_phone']).'</span>';
									  
									   ?>
                                  </div>
                                  </div>
                              </li>
				<?php endforeach; ?>
                          </ul>
                    </div>
                    <!-- Featured Properties Widget -->
                    <div class="widget sidebar-widget widget-properties">
                        <h3 class="widgettitle"><?php echo __('Featured Properties'); ?></h3>
                        <ul>
                        <?php foreach($side_bar['Property'] as $property): ?>
                              <li>
                                  <div class="row">
                                      <div class="col-md-5 col-sm-5 col-xs-5">
                                      <a href="<?php echo $this->Html->url(array('controller'=>'Properties','action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?>"><?php echo $this->Html->image('/files/property/thumb/'.$property['Property']['image1'],array('class'=>'img-thumbnail')); ?></a>
                                  </div>
                                  <div class="col-md-7 col-sm-7 col-xs-7">
                                      <strong><?php echo $this->Html->link(__(substr($property['Property']['title'],0,20)),array('controller'=>'Properties','action'=>'view',$property['Property']['id'],Inflector::slug(strtolower($property['Property']['title']),'-'))); ?></strong><br />
                                      <div class="price"><strong><?php if(isset($websiteSettings['currency_symbol'])) echo __($websiteSettings['currency_symbol']); ?></strong><span><?php echo number_format($property['Property']['price']); ?></span></div>
                                  </div>
                                  </div>
                              </li>
				<?php endforeach; ?>
                        </ul>
                    </div>
